package com.dennytech.tac.base;

import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;

import com.actionbarsherlock.app.SherlockFragment;

public class CFFragment extends SherlockFragment {

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
	}

	public Dialog createDialog(int menuResId,
			android.content.DialogInterface.OnClickListener l) {
		Dialog dialog = null;
		Builder builder = new android.app.AlertDialog.Builder(getActivity());
		builder.setItems(menuResId, l);
		dialog = builder.create();
		return dialog;
	}

	public static SharedPreferences preferences(Context c) {
		return c.getSharedPreferences(c.getPackageName(),
				Context.MODE_WORLD_READABLE | Context.MODE_WORLD_WRITEABLE);
	}

}
